package com.xsh.gls.service.impl;

import com.xsh.gls.mapper.DepotMapper;
import com.xsh.gls.pojo.Depot;
import com.xsh.gls.service.DepotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DepotServiceImpl implements DepotService {
    @Resource
    private DepotMapper depotMapper;

    @Override
    public boolean add(Depot depot) throws Exception {
        boolean flag=false;
        if (depotMapper.add(depot)>0){
            return true;
        }
        return flag;
    }

    @Override
    public List<Depot> selectByDepotName(String depotname) throws Exception {
        return depotMapper.selectByDepotName(depotname);
    }
}
